{template pifaleft}
<script type="text/javascript" src="{SITE_URL}js/DatePicker/WdatePicker.js"></script>
<div class="step">
	<ul>
    	<li class="step4"><a href="index.php?line/pifalineedit/$lid">1. 基本资料</a></li>
        <li class="step1"><a href="index.php?line/pifalineprice/$lid"><span style=" color:#FFF">2. 行程报价</span></a></li>
        <li class="step2"><a href="index.php?line/pifaeditday/$lid">3. 具体行程</a></li>
        <li class="step3"><a href="index.php?line/pifaeditdesc/$lid">4. 相关指南</a></li>
        <li><img src="css/user/rse.gif" width="87" height="25" /></li>
    </ul>
</div>
<div class="rightmenu">
	<div  class="tabprice">
	  <ul style="background-color:#f9fafe;text-align:center;">
	    <li class="tw100">服务标准</li>
	    <li class="tw100">成人价</li>
	    <li class="tw100">儿童价</li>
	    <li class="tw100">发团日期</li>
	    <li class="tw100 ">备注</li>
	    <li class="tw100 ">显示</li>
      </ul>
	  <!-- for -->
	  <form action="" method="POST">
	  <input type="hidden" name="submit" value="1" />
	  {if isset($lineprice[id])}
	  {loop $pricelist $key=>$value}
	  	  <input type="hidden" name="id[]" value="{$value[id]}"/>
		  <ul class="bod1_bot" style="text-align:center;">
		    <li class="tw100"><input type="text" name="servicestand[]" size="13" value="{$value[servicestand]}" /></li>
		    <li class="tw100"><input type="text" name="price_stand[]" value="{$value[price_stand]}" onclick="this.value=''" size="3" /> <input type="text" name="price_seller[]" value="{$value[price_seller]}" size="3" onclick="this.value=''" /></li>
		    <li class="tw100 "><input type="text" name="price_child_stand[]" value="{$value[price_child_stand]}" onclick="this.value=''" size="3" /> <input type="text" name="price_child_seller[]" value="{$value[price_child_seller]}" size="3" onclick="this.value=''" /></li>
		    <li class="tw100 "><input type="text" name="senddate[]" value="{$value[senddate]}" size="8"/></li>
		    <li class="tw100 "><input type="text" name="descs[]" value="{$value[descs]}" size="10"/></li>
		    <li class="tw100 "><input type="checkbox" name="isdef[]" value="1"{if $value[isdef]}checked{else}{/if}/></li>
	      </ul>
	      {/loop}    
	  {else}
	  <ul class="bod1_bot" style="text-align:center;">
	    <li class="tw100"><input type="text" name="servicestand[]" size="13" /></li>
	    <li class="tw100"><input type="text" name="price_stand[]" value="同业价" onclick="this.value=''" size="3" /> <input type="text" name="price_seller[]" value="销售价" size="3" onclick="this.value=''" /></li>
	    <li class="tw100 "><input type="text" name="price_child_stand[]" value="同业价" onclick="this.value=''" size="3" /> <input type="text" name="price_child_seller[]" value="销售价" size="3" onclick="this.value=''" /></li>
	    <li class="tw100 "><input type="text" name="senddate[]" value="" size="8"/></li>
	    <li class="tw100 "><input type="text" name="descs[]" value="" size="10"/></li>
	    <li class="tw100 "><input type="checkbox" name="isdef[]" value="1"/></li>
      </ul>
	<ul class="bod1_bot" style="text-align:center;">
	    <li class="tw100"><input type="text" name="servicestand[]" size="13" /></li>
	    <li class="tw100"><input type="text" name="price_stand[]" value="同业价" onclick="this.value=''" size="3" /> <input type="text" name="price_seller[]" value="销售价" size="3" onclick="this.value=''" /></li>
	    <li class="tw100 "><input type="text" name="price_child_stand[]" value="同业价" onclick="this.value=''" size="3" /> <input type="text" name="price_child_seller[]" value="销售价" size="3" onclick="this.value=''" /></li>
	    <li class="tw100 "><input type="text" name="senddate[]" value="" size="8"/></li>
	    <li class="tw100 "><input type="text" name="descs[]" value="" size="10"/></li>
	    <li class="tw100 "><input type="checkbox" name="isdef[]" value="1"/></li>
      </ul>
      {/if}
      <span id="priceparam"></span>
	 <ul class="bod1_bot" style="text-align:center;">
	 	<li class="tw100">增加 <a href="javascript:" id="addprice">[ + ]</a></li>
	 	<li class="tw100">删除 <a href="javascript:" id="reduceprice">[ - ]</a></li>
	 	<li class="tw100"></li>
	 	<li class="tw100"></li>
	 	<li class="tw100"></li>
	 	<li class="tw100">
	 		<input type="submit" value="  确 定 提 交  " />
	 	</li>
	 </ul>
	 </form>
	  <!--for del end-->
  </div>
<script>
	var a = 1;
	var b = 1;
	$('#addprice').click(function(){
		if (a == 11) {
			alert ('最多只允许添加10个');
			return false;
		}
		$('#priceparam').append('<ul class="bod1_bot" id="param-' + a + '" style="text-align:center;"><li class="tw100"><input type="text" name="servicestand[]" size="13" /></li><li class="tw100"><input type="text" name="price_stand[]" value="同业价" onclick="this.value=\'\'" size="3" /> <input type="text" name="price_seller[]" value="销售价" size="3" onclick="this.value=\'\'" /></li><li class="tw100 "><input type="text" name="price_child_stand[]" value="同业价" onclick="this.value=\'\'" size="3" /> <input type="text" name="price_child_seller[]" value="销售价" size="3" onclick="this.value=\'\'" /></li><li class="tw100 "><input type="text" name="senddate[]" value="" size="8"/></li><li class="tw100 "><input type="text" name="descs[]" value="" size="10"/></li><li class="tw100 "><input type="checkbox" name="isdef[]" value="1"/></li></ul>');
		a++;
	})
	$('#reduceprice').click(function(){
		var c = 'param-' + (a-1);
		$('#'+c).remove();
		a--;
	})
	$('#price_type_form').submit(function(){
		if ($('#price_stand').val() == '') {
			alert ('成人同业价不能为空！');
			$('#price_stand').focus();
			return false;
		}
		if ($('#price_seller').val() == '') {
			alert ('成人同业销售价不能为空！');
			$('#price_seller').focus();
			return false;
		}
		if ($('#price_child_stand').val() == '') {
			alert ('儿童价同业价不能为空！');
			$('#price_child_stand').focus();
			return false;
		}
		if ($('#price_child_seller').val() == '') {
			alert ('儿童销售价不能为空！');
			$('#price_child_seller').focus();
			return false;
		}
		if ($('#senddate').val() == '') {
			alert ('发团日期不能为空！');
			$('#senddate').focus();
			return false;
		}
		if ($('#servicestand').val() == '') {
			alert ('服务标准不能为空！');
			$('#servicestand').focus();
			return false;
		}
	})
</script>
<!-- bottom-->
{template footer}